package com.darrenchan.leetcode;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @Desc
 * @Author chenchi03
 * @CreateTime 2020-09-12 10:28
 */
public class ANBN {
    public static void main(String[] args) {
        int[] a = new int[]{1,2,3,4,5,6,7,8,9};
        int[] b = new int[9];

        b[0] = 1;
        for (int i = 1; i < a.length; i++) {
            b[0] *= a[i - 1];
            b[i] = b[0];
        }

        b[0] = 1;
        for (int i = a.length - 2; i >= 1; i--) {
            b[0] *= a[i + 1];
            b[i] *= b[0];
        }

        b[0] *= a[1];
        System.out.println(Arrays.toString(b));

        List<Integer> list = new ArrayList<>(10);
        System.out.println(list);
    }
}
